//
//  CCitySelector.h
//  HCHK_iphone
//
//  Created by yilong zhang on 12-4-11.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MKMapView.h>
#import <QuartzCore/QuartzCore.h>
#import "CLocator.h"

typedef enum {ToCountry, ToProvince, ToCity, ToStreet}ShowGrade;

@protocol CitySelectorProtocal <NSObject>

@optional
-(void)DidCitySelectorActived:(int)index Object:(id)object;

@end

@interface CCitySelector : UIView

@property (nonatomic, assign) id<CitySelectorProtocal>  delegate;

@property (nonatomic, assign) UINavigationBar   *m_TopBar;
@property (nonatomic, assign) UINavigationItem  *m_NaviItem;
@property (nonatomic, assign) UIImageView       *m_Title;
@property (nonatomic, assign) ShowGrade         m_enShowGrade;
@property (nonatomic, assign) MKMapView         *m_MapView;
@property (nonatomic, assign) UILabel           *m_City;
@property (nonatomic, assign) UIButton          *m_ComitBtn;
@property (nonatomic, assign) UIView            *m_LoadView;
@property (nonatomic, assign) UIView            *m_LoadBack;
@property (nonatomic, assign) UIActivityIndicatorView *m_Indicator;

-(id)initWithFrame:(CGRect)frame ShowGrade:(ShowGrade)showgrade;
-(void)OnComitButtonDown:(UIButton*)sender;
-(void)OnFinishedDown:(UIButton*)sender;
-(void)OnCancelDown:(UIButton*)sender;
-(void)ListenLocation:(NSNotification*)notification;

@end
